package com.zxl.yjb.adapter;

import android.content.Context;

import com.zxl.yjb.R;
import com.zxl.yjb.bean.SkillClassifyBean;

import java.util.ArrayList;

import q.rorbin.verticaltablayout.adapter.TabAdapter;
import q.rorbin.verticaltablayout.widget.TabView;

public class SkillTabAdapter implements TabAdapter {

    private ArrayList<SkillClassifyBean> list;

    public SkillTabAdapter(ArrayList<SkillClassifyBean> list) {
        this.list = list;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public TabView.TabBadge getBadge(int position) {
        return null;
    }

    @Override
    public TabView.TabIcon getIcon(int position) {
        return null;
    }

    @Override
    public TabView.TabTitle getTitle(int position) {
        return new TabView.TabTitle.Builder()
                .setContent(list.get(position).getName())
                .setTextColor(0xFFFF4C00,0xFF000000)
                .build();
    }

    @Override
    public int getBackground(int position) {
        return -1;
    }
}
